<%@page import="homework.service.LoginService"%>
<%@page import="homework.database.Util"%>
<%!
	boolean loginSuccess = false;
	String name = "";
%>
<%
	LoginService service = new LoginService(request.getParameter("account"), request.getParameter("password"));

	loginSuccess = service.isLoginSuccess;
	
	name = service.name;
%>
<%
	if(loginSuccess) {
%>
	<jsp:forward page="index.jsp">
		<jsp:param value="<%= name %>" name="name"/>
	</jsp:forward>
<%
	} else { 
%>
	<jsp:forward page="error.jsp"></jsp:forward>
<%
	}
%>